<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>贪吃蛇</title>
    <link rel="stylesheet" href="./贪吃蛇.css" />
  </head>
  <body>
    <button class="start">开始</button>
    <button class="stop">结束</button>
    <div class="map"></div>
  </body>
  <script src="./game.js"></script>
  <script src="./map.js"></script>
  <script src="./food.js"></script>
  <script src="./snake.js"></script>
  <script>
    let g = new Game(".map");
    let start = document.querySelector(".start");
    let stop = document.querySelector(".stop");
    start.addEventListener("click", () => g.start());
    stop.addEventListener("click", () => g.stop());
  </script>
</html>
